package com.itheima;

import java.util.Random;

public class test03 {
    public static void main(String[] args) {
        //int[] arr = new int[5]{};
        int[] arr = new int[5];
        Random r = new Random();
        for (int i = 0; i < arr.length; i++) {
            //arr[i] = r.nextInt(40)+11;
            arr[i] = r.nextInt(41)+10;
        }
        //int newArr = getNewArr(arr);
        int[] newArr = getNewArr(arr);
        System.out.println("修改后的数组元素为: ");
        for (int i = 0; i < newArr.length; i++) {
            System.out.println(newArr[i]);
        }
    }
    public static int[] getNewArr(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            //if((arr[i]%10)%2==0){
            if((arr[i]/10%10)%2==0){
                //arr[i]="0";
                arr[i]=0;
            }
        }
        return arr;
    }
}
